<template>
  <div>
    <div class="mt-bouncer" style="touch-action: none;">
        <slot></slot>
    </div>
  </div>
</template>

<script>
//iscroll实例
let bouncer

export default {
  data() {
    return {}
  },
  mounted() {
    bouncer = new IScroll(this.$el, { click: true })
  },
  methods: {
    refresh() {
      bouncer.scrollTo(0, 0)
      bouncer.refresh()
    }
  }
}
</script>

<style lang="scss">
.mt-scroller {
  position: fixed;
  // z-index: 9999;
  width: 100%;
  top: 86px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: scroll;
  background: #fff;
  font-size: 14px;
  color: #aaa;
  touch-action: none;
  // overflow:auto;

  .mt-scroller-bottom {
    height: 40px;
    line-height: 40px;
    background: #fff;
    text-align: center;

    .vux-spinner {
      vertical-align: sub;
    }
  }
}
</style>
